# name_dict = {"a":['001',10,5000],
#              "b":['002',10,5000],
#              "c":['003',12,5500],
#              "d":['004',13,5700],
#              "e":['005',9,4500],
#              "f":['006',2,3000],
#              "g":['007',15,7000],
#              "h":['008',14,6000],
#              "i":['009',13,]}


employees = {
    10 : [ 'Austin', 3, 8000 ],
    13 : [ 'Den', 2, 7500 ],
    15 : [ 'John', 4, 6000 ],
    17 : [ 'Jiang', 2, 9000 ],
    20 : [ 'Jason', 4, 5000 ],
    4  : [ 'Lin', 6, 5600 ],
    8  : [ 'Jack', 10, 12000 ],
    38 : [ 'Ray', 8, 10000 ],
    29 : [ 'Steve', 5, 8900 ],
    78 : [ 'Joe', 8, 13000 ],
}

employee_list = sorted( employees.items(), key = lambda item : item[1][2], reverse = True )

print( 'After sorted by the salary:' )
for employee in employee_list:
    print( 'ID: %s, Name: %s, Length of Service: %s, Salary: %s' %( employee[0], employee[1][0], employee[1][1], employee[1][2] ) )